
/**
 * Write a description of class Composant here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Composant
{
    // instance variables - replace the example below with your own
    private String nomComposant;

    /**
     * Constructor for objects of class Composant
     */
    public Composant(String n)
    {
        // initialise instance variables
       this.nomComposant = n; 
    }

    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    public String getNomComposant()
    {
        // put your code here
        return this.nomComposant;
    }
    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    public void setNomComposant(String nc)
    {
        // put your code here
        this.nomComposant = nc ;   
        
    }
    
    /**
     * An example of a method - replace this comment with your own
     * 
     * @param  y   a sample parameter for a method
     * @return     the sum of x and y 
     */
    public String toString()
    {
        // put your code here
        return("Le nom du composant est : " + this.getNomComposant());
    }
}
